﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace StockTrading.ViewModel
{
    public class CommandBase : ICommand
    {
        public event EventHandler CanExecuteChanged;
        public Action<object> ExecuteAction;
        public Func<object, bool> CanExecuteFunc;
        public bool CanExecute(object parameter)
        {
            return CanExecuteFunc(parameter);
        }
        public void Execute(object parameter)
        {
            ExecuteAction(parameter);
        }
    }

}
